Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/src/cloud-init/.github/workflows/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/src/cloud-init/.github/workflows/integration.yml
name: Integration Tests

on:
  pull_request:
    branches-ignore:
      - 'ubuntu/**'

concurrency:
  group: 'ci-${{ github.workflow }}-${{ github.ref }}'
  cancel-in-progress: true

defaults:
  run:
    shell: sh -ex {0}

env:
  RELEASE: bionic

jobs:
  package-build:
    runs-on: ubuntu-22.04
    steps:
      - name: "Checkout"
        uses: actions/checkout@v3
        with:
          # Fetch all tags for tools/read-version
          fetch-depth: 0
      - name: Prepare dependencies
        run: |
          sudo DEBIAN_FRONTEND=noninteractive apt-get update
          sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \
            debhelper \
            dh-python \
            fakeroot \
            python3-setuptools \
            sbuild \
            ubuntu-dev-tools
          sudo sbuild-adduser $USER
          cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc
          # Install all build and test dependencies
          ./tools/read-dependencies -r requirements.txt -r test-requirements.txt -d ubuntu -s -i
      - name: Build package
        run: |
          ./packages/bddeb -S -d --release ${{ env.RELEASE }}
          sudo -E su $USER -c 'mk-sbuild ${{ env.RELEASE }}'
          sudo -E su $USER -c 'DEB_BUILD_OPTIONS=nocheck sbuild --nolog --no-run-lintian --no-run-autopkgtest --verbose --dist=${{ env.RELEASE }} --build-dir=${{ runner.temp }} cloud-init_*.dsc'
      - name: Archive debs as artifacts
        uses: actions/upload-artifact@v3
        with:
          name: 'cloud-init-${{ env.RELEASE }}-deb'
          path: '${{ runner.temp }}/cloud-init*.deb'
          retention-days: 3

  integration-tests:
    needs: package-build
    runs-on: ubuntu-22.04
    steps:
      - name: "Checkout"
        uses: actions/checkout@v3
        with:
          # Fetch all tags for tools/read-version
          fetch-depth: 0
      - name: Retrieve cloud-init package
        uses: actions/download-artifact@v3
        with:
          name: 'cloud-init-${{ env.RELEASE }}-deb'
      - name: Verify deb package
        run: |
          ls -hal cloud-init*.deb
      - name: Prepare test tools
        run: |
          sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
          sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox wireguard
      - name: Initialize LXD
        run: |
          ssh-keygen -P "" -q -f ~/.ssh/id_rsa
          echo "[lxd]" > /home/$USER/.config/pycloudlib.toml
          sudo adduser $USER lxd
          # Jammy GH Action runners have docker installed, which edits iptables
          # in a way that is incompatible with lxd.
          # https://linuxcontainers.org/lxd/docs/master/howto/network_bridge_firewalld/#prevent-issues-with-lxd-and-docker
          sudo iptables -I DOCKER-USER -j ACCEPT
          sudo lxd init --auto
      - name: Run integration Tests
        run: |
          sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls cloud-init*.deb)" tox -e integration-tests-ci'

haha - 2025